<?php
class car {
	private $carMode;
	private $carBand;
	private $Speed;
	private $weight;


	function car($carMode,$carBand,$Speed,$weight){
		$this ->carMode = $carMode;
		$this ->carBand = $carBand;
		$this ->Speed = $Speed;
		$this ->weight = $weight;
	}



	function getweight(){
		return $this ->weight;
	}
	function getSpeed(){
		return $this ->Speed;
	}
	
}
	
$car1 = new car("捷达","大众",160,1.5);
/*$car1 ->carMode = "捷达";
$car1 ->carBand = "大众";
$car1 ->Speed = 160;
$car1 ->weight = 1.5;*/
	echo $car1->getweight();
	echo '</br>';
	//echo $car1->Speed;
	echo $car1->getSpeed();
	echo '</br>';
	echo '</br>';
	echo '</br>';
	echo '</br>';



class BMWCar extends car{};
$bmw1 = new BMWCar("宝马","大众",200,2);
	echo $bmw1->getweight();
	echo '</br>';
	echo $bmw1->getSpeed();
















?>